export default {
    // user用户模块
    namespaced: true, // 需要开启命名空间
    state: () => ({
        username: 'lianlian',
        age: 18,
        hobby: '老二次元了'
    }),
    getters: {
        upperCaseName(state) {
            // state指的是当前模块中的state
            return state.username.toUpperCase()
        }
    },
    mutations: {
        updateUser(state, payload) {
            state.username = payload
        }
    },
    actions: {}
}
